/*
 * test.cpp
 *
 *  Created on: 2013-10-23
 *      Author: zy
 */
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
int main()
{
	bool di[10];
	int time[10];
	for (int i = 101; i <= 200; i++)
	{
		memset(time, 0, sizeof(time));
		for (int j = 1; j <= 100; j++)
		{
			memset(di, 0, sizeof(di));
			int x = i * j;
			while (x > 0)
			{
				di[x % 10] = 1;
				x /= 10;
			}
			for (int k = 0; k <= 9; k++)
				if (di[k])
					time[k]++;
		}
		printf("The digits show up every time for %d:", i);
		for (int j = 0; j <= 9; j++)
			if (time[j] == 100)
				printf(" %d", j);
		printf("\n");
	}
	return 0;
}
